<?
/******************************************************************************************/
define(PROGRAM_TITLE,"PLC Unit Manager");
define(DHCP_TITLE, "DHCP Deamon Manager");
define(UNITNAME, "Unit Name");
define(MAC, "MAC ADDRESS");
define(IP, "IP ADDRESS");
define(LOCAL, "LOCAL ADDRESS");
define(POPUP_PAGE, "javascript:OpenDetail");
define(CONFFILE, "dhcpd.conf");
define(DBHOST, "localhost");
define(DBUSER, "root");
define(DBPASS, "7777");
define(DBNAME, "imsi");
/******************************************************************************************/
// Visual Function 

function createButton($type, $idVal, $NmVal)
{
	$strBtn = "<input type=\"$type\" name=\"$idVal\" value=\"$NmVal\">\n";
	return $strBtn;
}
function createHidden($Id, $Value)
{
	$strField = "<input type=\"hidden\" name=\"$Id\"  value=\"$Value\">\n";
	return $strField;
}
function connectDb()
{
	$link = mysql_connect(DBHOST, DBUSER, DBPASS);
	if (!$link) { die ('Not Connected : '. mysql_error()); }
			
	$isSelected = mysql_select_db(DBNAME,$link);
	if(!$isSelected) { die ("cannot select db"); }
		
	return $link;
}
?>
